package com.sz.biz.logistics.serialno.dto;

import com.sz.biz.logistics.serialno.constants.BillNumberMessagesCodes;
import com.sz.common.base.i18n.I18nMessageHelper;
import lombok.Data;

/**
 * Function: 单号导入结果DTO <br>
 * Author: Johnboy <br>
 * Date: 2017-12-10 20:50:00
 */
@Data
public class SerialNoImportResultDto {
    private String serialNumber;
    private Integer ruleId;
    private boolean canImport;
    private String status;

    public SerialNoImportResultDto(String serialNumber , Integer ruleId , boolean canImport) {
        this.serialNumber = serialNumber;
        this.ruleId = ruleId;
        this.canImport = canImport;
    }

    public String getStatus() {
        return I18nMessageHelper.getI18nMessage(canImport?
                                                        BillNumberMessagesCodes
                .MODULE_CHANNEL_NO_IMPORT_STATUS_SUCCESS:
                                                        BillNumberMessagesCodes.MODULE_CHANNEL_NO_IMPORT_STATUS_FAILURE, null);
    }
}
